﻿namespace ContactSMS.Commons.Util
{
    public class PassWordUtil
    {
        public static string HashPassword(string password)
        {
            return BCrypt.Net.BCrypt.HashPassword(password);
        }

        public static bool VerifyPassword(string hashedPassword, string providedPassword)
        {
            // 验证提供的密码和存储的哈希密码是否匹配
            return BCrypt.Net.BCrypt.Verify(providedPassword, hashedPassword);
        }
    }
}
